package lab02.test22;

public class PrintString {
    public void print(String str) {
        char[] ch = str.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] >= 'A' && ch[i] <= 'Z') {
                char c = (char) (ch[i] + 32);
                System.out.print(c);
            } else if (ch[i] >= 'a' && ch[i] <= 'z') {
                char c = (char) (ch[i] - 32);
                System.out.print(c);
            } else if (ch[i] >= '0' && ch[i] <= '9') {
                System.out.print("0");
            } else {
                System.out.print("#");
            }
        }
    }
}
